package com.wakala.employment.fragment.other;

import android.view.LayoutInflater;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.wakala.employment.R;
import com.wakala.employment.core.BaseFragment;
import com.wakala.employment.databinding.FragmentCommonConfigBinding;
import com.xuexiang.xpage.annotation.Page;
import com.xuexiang.xpage.enums.CoreAnim;
import com.xuexiang.xui.widget.actionbar.TitleBar;
import com.xuexiang.xui.widget.textview.supertextview.SuperTextView;

/**
 * A simple {@link Fragment} subclass.
 * Use the {@link CommonConfigFragment#} factory method to
 * create an instance of this fragment.
 */
@Page(anim = CoreAnim.none)
public class CommonConfigFragment extends BaseFragment<FragmentCommonConfigBinding> implements SuperTextView.OnSuperTextViewClickListener {


    @NonNull
    @Override
    protected FragmentCommonConfigBinding viewBindingInflate(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, boolean attachToRoot) {
        return FragmentCommonConfigBinding.inflate(inflater, container, attachToRoot);
    }


    @Override
    protected TitleBar initTitle() {
        return super.initTitle().setTitle("通用设置");
    }

    @Override
    protected void initListeners() {
        binding.menuBlackList.setOnSuperTextViewClickListener(this);
    }

    @Override
    protected void initViews() {

    }

    @Override
    public void onClick(SuperTextView superTextView) {
            int id = superTextView.getId();
            if(id == R.id.menu_black_list){
                openNewPage(BlackListFragment.class);
            }
    }
}